import request from '@/utils/request'

// 获取标签列表
export function getTagList(query) {
  return request({
    url: '/admin-api/labels',
    method: 'get',
    params: query
  })
}

// 创建标签
export function createTag(data) {
  return request({
    url: '/admin-api/labels',
    method: 'post',
    data
  })
}

// 删除标签
export function removeTag(id) {
  return request({
    url: '/admin-api/labels/' + id,
    method: 'DELETE'
  })
}

// 修改标签
export function updateTag(id, data) {
  return request({
    url: '/admin-api/labels/' + id,
    method: 'put',
    data
  })
}
